import { useToast } from '@/components'

const $toast = useToast()

const msg = {
    success(detail) {
        $toast.add({ severity: 'success', summary: 'Success', detail, life: 3000 })
    },
    error(detail) {
        $toast.add({ severity: 'error', summary: 'Error', detail, life: 3000 })
    },
    warn(detail) {
        $toast.add({ severity: 'warn', summary: 'Warn', detail, life: 3000 })
    },
    info(detail) {
        $toast.add({ severity: 'info', summary: 'Infor', detail, life: 3000 })
    }
}

export const { success, error, warn, info } = msg;